package e_predicate;


import java.util.function.Predicate;

public class Demo01 {
    public static void method(String str , Predicate<String> pre){
        //对字符串进行判断
        boolean test = pre.test(str);
        System.out.println(test);
    }

    public static void main(String[] args) {
        String str = "迪丽热巴";

        method(str,
                s -> s.length() == 3);
    }
}
